package com.mes.code.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.GenericGenerator;

import com.mes.basicdata.domain.ClassInformation;
import com.mes.common.domain.BasicModel;


/**
 * CCoderesult generated by MyEclipse Persistence Tools
 *author lcs
 *data 2017-03-29
 */
@Entity()
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Table(name = "C_CODERESULT")
@BatchSize(size=10)
//@Lazy(value=true)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class CodeResult extends BasicModel implements Serializable
{
	@Id
	@GenericGenerator(name = "ccUid", strategy = "assigned")
	@Column(name = "CCUID")
	private String ccUid;
	
	@Override
	public String getUuid() {
		return ccUid;
	}

	@Override
	public void setUuid(String uuid) {
		this.ccUid = uuid;
	}
	
	public String getCcUid() {
		return ccUid;
	}

	public void setCcUid(String ccUid) {
		this.ccUid = ccUid;
	}
	
	

	// Fields
	@Column(name="CLASS_UID",length=50)
	private String classUid;
	
	//many-to-one
		@ForeignKey(name="null")
		@ManyToOne(fetch=FetchType.EAGER)
		@JoinColumn(name="CLASS_UID",insertable=false,updatable=false)
	private ClassInformation classInformation;
	
	@Column(name="GENCODE",length=100)
	private String generatedCode;
	
	@Transient
	private String customerFeatures;
	
	@Column(name="RULE_CLASS_UID",length=50)
	private String ruleClassUid;
	
	@Column(name="FEATURES",length=500)
	private String features;
	
	@Column(name="FEATURES_FORMAT",length=500)
	private String featuresFormat;
	
	@Transient
	private String codeErrorId;
	
	@Column(name="AUDITSTATUS",length=50)
	private String auditStatus;
	
	@Transient
	private Boolean isNew = true;// �Ƿ��������ɵı���

	@Column(name="CREATTIME",length=6)
	private Date creatTime;
	


	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	public Boolean getIsNew()
	{
		return isNew;
	}

	public void setIsNew(Boolean isNew)
	{
		this.isNew = isNew;
	}

	public String getGeneratedCode()
	{
		return generatedCode;
	}

	public void setGeneratedCode(String generatedCode)
	{
		this.generatedCode = generatedCode;
	}

	public String getFeatures()
	{
		return features;
	}

	public void setFeatures(String features)
	{
		this.features = features;
	}

	public String getFeaturesFormat()
	{
		return featuresFormat;
	}

	public void setFeaturesFormat(String featuresFormat)
	{
		this.featuresFormat = featuresFormat;
	}

	public String getCreatorId()
	{
		return super.getCreatorUid();
	}

	public Date getCreateTime()
	{
		return super.getCreateTime();
	}

	public String getCreatorUid()
	{
		return creatorUid;
	}

	public void setCreatorUid(String creatorUid)
	{
		this.creatorUid = creatorUid;
	}

	public String getNotes()
	{
		return notes;
	}

	public void setNotes(String notes)
	{
		this.notes = notes;
	}

	public String getAuditStatus()
	{
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus)
	{
		this.auditStatus = auditStatus;
	}

	public String getClassUid()
	{
		return classUid;
	}

	public void setClassUid(String classUid)
	{
		this.classUid = classUid;
	}

	public ClassInformation getClassInformation()
	{
		return classInformation;
	}

	public void setClassInformation(ClassInformation classInformation)
	{
		this.classInformation = classInformation;
	}

	public String getRuleClassUid()
	{
		return ruleClassUid;
	}

	public void setRuleClassUid(String ruleClassUid)
	{
		this.ruleClassUid = ruleClassUid;
	}

	public String getCodeErrorId()
	{
		return codeErrorId;
	}

	public void setCodeErrorId(String codeErrorId)
	{
		this.codeErrorId = codeErrorId;
	}

	public String getCustomerFeatures()
	{
		return customerFeatures;
	}

	public void setCustomerFeatures(String customerFeatures)
	{
		this.customerFeatures = customerFeatures;
	}
}
